<html>
<head>
<script src="brython.js"></script>
</head>

<body onLoad="brython()">
<img src="../brython.png">
<p>
<input type="text" id="clock">

<script type="text/python">
import time

timer = None

def set_clock():
    doc["clock"].value = time.strftime('%d/%m/%Y %H:%M:%S')

def start_clock():
    global timer
    timer = time.set_interval(set_clock,1000)

def stop_clock():
    time.clear_interval(timer)
</script>

<p>
<button onclick="start_clock()">Start</button>
<button onclick="stop_clock()">Stop</button>

</body>
</html> 